<template>
    <div>
        子
        <button @click="handleClick">click</button>

        <!-- 也可以这样写 -->
        <button @click="$emit('event',childtitle)">click</button>
    </div>
</template>

<script>
export default {
    data(){
        return {
            childtitle: 'child-11111'
        }
    },
    methods: {
        handleClick(){
            // console.log(this.childtitle);
            this.$emit('event',this.childtitle)
        }
    }
}
</script>

<style scoped>
div{
    background-color: yellow;
}
</style>